<script setup>

import {HomeFilled} from "@element-plus/icons-vue";
</script>

<template>

  <el-affix :offset="0">
    <div class="navbar">
      <div class="link-menu">
        <button class="link-button"
                style="display: flex;flex-direction: row;align-items: center"
                @click="item => {this.$router.push('/home')}"
        >
          <el-icon>
            <HomeFilled/>
          </el-icon>
          主页
        </button>
      </div>
      <div class="link-menu">
        <button class="link-button" @click="item => {this.$router.push('/orderdetail')}">测试按钮1</button>
        <el-divider direction="vertical" style="background-color: #A0A0A0"/>
        <button class="link-button" @click="item => {this.$router.push('/register')}">测试按钮2</button>
        <el-divider direction="vertical" style="background-color: #A0A0A0"/>
        <button class="link-button" @click="item => {this.$router.push('/history')}">测试按钮3</button>
      </div>
    </div>
  </el-affix>
</template>

<style scoped>

.navbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: #E3E4E5;
  padding: 5px 30px 0px 30px;
}

.link-menu {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.link-button {
  border: none;
  background-color: transparent;
  color: #A0A0A0;
  transition: color 0.3s;
}

.link-button:hover {
  color: #F00619;
}
</style>